<template>
	<view class="cont">
		<rich-text :nodes="nodes | filterCont(nodes)"></rich-text>
	</view>
</template>

<script>
	import HelpApi from "@/Api/Help.js"
	
	export default {
		data() {
			return {
				nodes: null
			};
		},
		filters: {
			filterCont(cont) {
				if(cont) {
					return cont.replace(/\<img/gi, '<img style="max-width: 100%;" ')
				} else {
					return ''
				}
		  }
		},
		onLoad() {
			HelpApi.help()
				.then(res=> this.nodes = res)
		}
	}
</script>

<style lang="scss">
	page{
		background: #fff;
	}
	.cont{
		padding: 30rpx;
	}
</style>
